home *** CD-ROM | disk | FTP | other *** search
/ Aminet 1 (Walnut Creek) / Aminet - June 1993 [Walnut Creek].iso / aminet / text / misc / psgrind.lha / readme.amiga < prev    next >
Text File  |  1993-04-10  |  2KB  |  97 lines

  1. PSGrind -- Program formatting utility.  Produces PostScript.
  2.     Amiga support by dylan mcnamee
  3.     dylan@cs.washington.edu
  4.  
  5. Grind is a classic utility that formats source code quite nicely.  It can
  6. do cute things like italicize comments, embolden keywords, print inobtrusive
  7. line numbers, and labels each page with the function defined on that page
  8. (or the last one, if there are more than one).  
  9.  
  10. PSGrind is a grind that produces postscript.  (Grind traditionally spits out
  11. troff commands.  Vgrind spits out LaTeX.)  A set of rules in the vgrindef file
  12. (put in s: by default) describes to grind how to format the language of your
  13. choice.  Currently defined languages are:
  14.  
  15. modula2
  16. pascal
  17. icon
  18. C
  19. C++        (I added support for this)
  20. lisp
  21. sh
  22. csh
  23. ldl
  24. TeX
  25. prolog
  26. ratfor
  27. yacc
  28. asm68
  29. a68
  30. asm
  31. PostScript
  32. fortran
  33. REXX
  34.  
  35. ------------
  36. Installation
  37.  
  38. Copy psgrind to a directory on your execution path.  It's small, so it would
  39. fit fine in most people's c: directory.  (approx 20 K)
  40.  
  41. Copy vgrindef and vinit.ps to s:  
  42.  
  43. (Typing make install does this, if you're lucky.)
  44.  
  45. -------------
  46. Configuration
  47.  
  48. Currently, you have to recompile psgrind to change anything (besides the 
  49. language definitions).  For example, if you didn't want the config files
  50. to live in s:, change the makefile location for LIBDIR, which is s: by default.
  51.  
  52. --------
  53. Examples
  54.  
  55. psgrind pfontedp.c > t:grind.ps
  56.  
  57. Produces in t:grind.ps a PostScript file containing the formatted version of
  58. the file pfontedp.c
  59.  
  60. psgrind -lrexx rexx:compile.rexx > t:rexxgrind.ps
  61.  
  62. Chooses rexx as the language to format for.
  63.  
  64. psgrind -2 pfontedp.c > t:grind.ps
  65.  
  66. Saves paper by producing 2 pages of formatted output per piece of paper.
  67. (Similar to but prettier (and slower) than enscript -2r)
  68.  
  69. -------
  70. Options
  71.  
  72. -h     specifies header for each page (defaults to file name)
  73.  
  74. -wide     formats for 132 column printouts
  75.  
  76. -2     specifies 2 pages per physical page
  77.  
  78. -    use stdin as input
  79.  
  80. -n    suppress bold keywords
  81.  
  82. -l     specify language
  83.  
  84. -l    specify language description file
  85.  
  86. -----------
  87. Limitations
  88.  
  89. Tabs work better than spaces for indenting, because psgrind's output uses 
  90. proportional fonts.
  91.  
  92. Functions must be defined with the function name and its arguments all
  93. on the same line.  The type needs to be on the line above.  This is because
  94. grind uses a pretty simple parser to determine what is a function definition.
  95.  
  96. No choice for fonts.
  97.